import type { FormItemRule } from 'element-plus'

type IFormType = 'input' | 'password' | 'select' | 'datepicker'
export interface IFormItem {
  type: IFormType
  label: string
  rules?: FormItemRule | FormItemRule[]
  placeholder?: string
  // 针对 select
  options?: any[]
  // 针对特殊的属性
  otherOptions?: any
}

export interface IForm {
  formItems: IFormItem[]
  labelWidth: string | number
  itemStyle: Record<string, string>
  colLayout: Record<string, number>
}
